<template>
  <div class="box">
    <div class="item-container roundy-10 cantSelect" :class="{'disabled': disabled}">
      {{ title }}  
    </div>
    <div class="dropList shadow roundy-10" v-if="this.$slots.secondMenuItem">
        <slot name="secondMenuItem"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'UserDropItem',
  props:{
    title:{
      type: String,
      default: '',
    },
    disabled:{
      type: Boolean,
      default: false,
    }
  },
}
</script>

<style scoped>
.item-container {
  height: 50px;
  /* background-color: rgb(255, 255, 255); */

  text-align: center;
  background-color: rgb(255, 255, 255);
  margin-top: 10px;
  margin-bottom: 10px;
  line-height: 50px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.item-container:not(.disabled):hover {
  transition: all 0.2s;
  background-color: rgb(243, 243, 243);
}
.item-container:not(.disabled):active {
  transition: all 0.2s;
  background-color: rgb(211, 211, 211);
}

.disabled {
  color: rgba(175, 175, 175, 0.473);
}

.box {
  position: relative;
}

.dropList {
  transition: all 0.5s ease 0.2s;
  opacity: 0;
  max-height: 0;
  width: 250px;
  background-color: rgb(255, 255, 255);
  position: absolute;
  top: -30px;
  left: -250px;
  padding: 10px;
  padding-top: 5px;
  padding-bottom: 5px;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 99;
  pointer-events: none;
}

.box:hover .dropList {
  transition: all 0.4s ease 0.4s;
  opacity: 1;
  max-height: 500px;
  top: -15px;
  pointer-events: auto;
}

</style>
